Control systems for electrosurgical generator

ABSTRACT

A controller for an electrosurgical generator includes an RF inverter, a signal processor, a software compensator, a hardware compensator, and an RF inverter controller. The RF inverter generates an electrosurgical waveform and the signal processor outputs a measured value of at least one of a voltage, a current, or power of the electrosurgical waveform. The software compensator generates a desired value for at least one of the voltage, the current, or the power of the electrosurgical waveform, and the hardware compensator generates a phase shift based on the measured value and the desired value. The RF inverter controller generates a pulse-width modulation (PWM) signal based on the phase shift to control the RF inverter.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority to and the benefit of U.S. Provisional Application No. 62/151,626 filed on Apr. 23, 2015, the entire contents of which are incorporated by reference herein.

BACKGROUND

1. Technical Field

The present disclosure relates to an electrosurgical system. More particularly, the present disclosure relates to electrosurgical generator control systems and methods for controlling a phase-shifted resonant inverter and/or high voltage direct current (DC) power supply of the electrosurgical generator.

2. Background of Related Art

Electrosurgery involves application of radio frequency (RF) alternating current (AC) to cut or modify biological tissue during an electrosurgical procedure. An electrosurgical generator, e.g., a power supply or waveform generator, generates the AC, which is applied to a patient's tissue through an active electrode and is returned to the electrosurgical generator through a return electrode.

During electrosurgery, the AC generated by the electrosurgical generator is conducted through tissue disposed between the active and return electrodes. The tissue's impedance converts the electrical energy, e.g., electrosurgical energy, associated with the AC into heat, which causes the tissue temperature to rise. The electrosurgical generator controls the treatment of the tissue by controlling various parameters of the AC supplied to the tissue. There is a need for an electrosurgical generator including improved control systems configured to precisely control energy delivery.

SUMMARY

The present disclosure features control systems for electrosurgical generators to control delivery of electrosurgical energy. In an embodiment, a controller for an electrosurgical generator includes an RF inverter, a signal processor, a software compensator, a hardware compensator, and an RF inverter controller. The RF inverter generates an electrosurgical waveform and the signal processor outputs a measured value of at least one of a voltage, a current, or power of the electrosurgical waveform. The software compensator generates a desired value for at least one of the voltage, the current, or the power of the electrosurgical waveform, and the hardware compensator generates a phase shift based on the measured value and the desired value. The RF inverter controller generates a pulse-width modulation (PWM) signal based on the phase shift to control the RF inverter.

In an aspect, the hardware compensator includes a setpointer configured to select a target value for at least one of the voltage, the current, or the power of the electrosurgical waveform, and a compensator configured to compensate for a first phase based on the target value. The compensator includes a proportional-integral-differential (PID) controller, which implements a second order PID algorithm. The compensator performs compensation for each period of the PWM signal.

In another aspect, the setpointer further determines a time when to switch the target value among a target voltage value, a target current value, and a target power value. The determined time is based on a measured value, and a maximum value of at least one of the voltage, the current, or the power of the electrosurgical waveform. The setpointer further prevents the RF electrosurgical energy from varying sufficiently before and after the target value is switched.

In yet another aspect, the hardware compensator further includes an impedance gain scheduler configured to calculate an impedance gain; a voltage gain scheduler configured to calculate a voltage gain; and a phase gain scheduler configured to calculate a phase gain. The hardware compensator further multiplies the first phase by the impedance gain and the voltage gain to obtain a second phase, and further multiplies the second phase by the phase gain to obtain a third phase.

In yet another aspect, the hardware compensator further includes a limiter configured to limit the third phase within a predetermined range.

In yet another aspect, the hardware compensator further includes an integrated error calculator configured to calculate an integrated error based on at least one of the impedance gain, the voltage gain, the phase gain, the second phase, and the third phase. The compensator further compensates for the first phase further based on the error between the desired value and the measured value of the target. The controller further includes a scale configured to scale the third phase and provide the scaled third phase to the RF inverter controller.

In yet another aspect, the hardware compensator is further configured to generate the phase shift for the RF inverter controller in response to an update signal from the RF inverter controller,

In still another aspect, the compensator further compares the desired value with the measured value.

In still another aspect, the software compensator is further configured to update the desired value in response to a change in impedance.

In still another aspect, the RF inverter is further configured to adjust average power of the electrosurgical waveform based on the phase shift, the phase shift being from about zero to about pi radian.

In still another aspect, the desired value and the measured value are root mean square (RMS) values.

In yet still another aspect, the signal processor further decimates and filters sensed voltage and current waveforms of the electrosurgical waveform to provide first and second path data to the software compensator.

In another embodiment, an electrosurgical generator includes an RF inverter, a plurality of sensors, a plurality of ADCs, and a controller. The RF inverter generates an electrosurgical waveform, the plurality of sensors is coupled to the RF inverter and senses a voltage waveform and a current waveform of the electrosurgical waveform, and the plurality of ADCs digitally samples the sensed voltage and current waveforms.

The controller is coupled to the plurality of ADCs and includes a signal processor, a software compensator, a hardware compensator, and an RF inverter controller. The signal processor outputs a measured value of at least one of a voltage, a current, or power of the electrosurgical waveform. The software compensator generates a desired value for at least one of the voltage, the current, or the power of the electrosurgical waveform, and the hardware compensator generates a phase shift based on the measured value and the desired value. The RF inverter controller generates a pulse-width modulation (PWM) signal based on the phase shift to control the RF inverter.

In yet another embodiment, an electrosurgical generator includes a power supply, a radio frequency (RF) inverter, a plurality of sensors, a plurality of analog-to-digital converters (ADCs), and a controller. The power supply outputs high voltage direct current (HVDC) power. The RF inverter is coupled to the power supply and generates an electrosurgical waveform, the plurality of sensors senses a voltage waveform and a current waveform of the electrosurgical waveform, and the plurality of ADCs digitally samples the sensed voltage and current waveforms.

The controller is coupled to the plurality of ADCs and includes a signal processor, a software compensator, a HVDC setpointer, and an RF inverter controller. The signal processor outputs a measured value of at least one of a voltage, a current, or power of the electrosurgical waveform. The HVDC setpointer sets a magnitude for the power supply. The RF inverter controller generates a PWM signal having a fixed phase to control the RF inverter.

In an aspect, the fixed phase is in a range where the RF inverter operates in zero voltage switching. The fixed phase is in a range where contribution of third and fifth harmonics is optimized with respect to the contribution of a fundamental of the PWM signal.

In another aspect, the signal processor calculates a phase shift and compares the phase shift with the fixed phase. The HVDC setpointer decreases the desired value for the HVDC power when the phase shift is less than the fixed phase, and increases the desired value for the HVDC power when the phase shift is greater than the fixed phase.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the present disclosure are described with reference to the accompanying drawings wherein:

FIG. 1 is a perspective view of an electrosurgical system in accordance with embodiments of the present disclosure;

FIG. 2 is a block diagram of an electrosurgical generator of the electrosurgical system of FIG. 1 in accordance with embodiments of the present disclosure;

FIG. 3 is a schematic diagram of a controller of the electrosurgical generator of FIG. 2 in accordance with embodiments of the present disclosure;

FIG. 4A is a graphical illustration of pulse width modulated (PWM) signals supplied to an RF inverter based on a phase shift in accordance with embodiments of the present disclosure;

FIG. 4B is a graphical illustration of output voltages of the RF inverter based on a phase shift in accordance with embodiments of the present disclosure;

FIGS. 5A-5C are block diagrams of a phase gain scheduler of the electrosurgical generator of FIG. 2 in accordance with embodiments of the present disclosure;

FIGS. 6A and 6B are phase gain plots in accordance with embodiments of the present disclosure;

FIGS. 6C-6F are plots of a method to calculate a lookup table for a phase gain stored in a gain scheduler of the electrosurgical generator of FIG. 2 in accordance with embodiments of the present disclosure;

FIG. 7 is a functional block diagram of a PWM module of the electrosurgical generator of FIG. 2 in accordance with embodiments of the present disclosure;

FIGS. 8A and 8B are functional block diagrams of a controller of the electrosurgical generator of FIG. 2 in accordance with embodiments of the present disclosure;

FIG. 9 is a block diagram of the electrosurgical generator of FIG. 2 in accordance with embodiments of the present disclosure; and

FIG. 10 is a plot of percentage contribution of the third and fifth harmonics relative to the fundamental of the PWM signal.

DETAILED DESCRIPTION

The present disclosure provides an electrosurgical generator, a phase-shifted resonant inverter, a high voltage DC power supply, a hardware compensator, and a software compensator embodied in a controller for controlling output of the resonant inverter and the power supply. The resonant inverter includes a plurality of switching components, e.g., MOSFETs, controlled by PWM signals. In particular, the hardware compensator controls and adjusts phase shift of the PWM signals supplied to the resonant inverter based on various tissue and energy data, e.g., voltage, current, power, and the impedance of treated tissue. The hardware compensator controls the phase shift faster than the software compensator, while the software compensator outputs results having greater accuracy than the hardware compensator does.

FIG. 1 illustrates an electrosurgical system 100 in accordance with embodiments of the present disclosure. The electrosurgical system 100 includes an electrosurgical generator 102 which generates electrosurgical energy for treating tissue of a patient. The electrosurgical generator 102 generates electrosurgical energy at an appropriate level based on the selected mode of operation (e.g., cutting, coagulating, ablating, or sealing), the sensed voltage and current waveforms of the electrosurgical energy, measured tissue properties, and combinations thereof. The electrosurgical generator 102 may also include a plurality of output connectors for coupling the electrosurgical generator 102 a variety of electrosurgical instruments.

The electrosurgical system 100 may include a monopolar electrosurgical instrument 110 having an electrode for treating tissue of the patient (e.g., an electrosurgical cutting probe, also known as an electrosurgical pencil, or an ablation electrode) with a return pad 120. The monopolar electrosurgical instrument 110 can be connected to the electrosurgical generator 102 via one of the plurality of output connectors. The electrosurgical energy is supplied to the monopolar electrosurgical instrument 110, which applies the electrosurgical energy to treat the tissue. The electrosurgical energy is returned to the electrosurgical generator 102 through the return pad 120. The return pad 120 provides a sufficient contact area with the patient's tissue so as to minimize the risk of tissue damage due to the electrosurgical energy applied to the tissue.

The electrosurgical system 100 may also include a bipolar electrosurgical instrument 130 including a pair of opposing jaw members. The bipolar electrosurgical instrument 130 can be connected to the electrosurgical generator 102 via one of the plurality of output connectors. The electrosurgical energy is supplied to one of the two jaw members, is applied to treat the tissue, and is returned to the electrosurgical generator 102 through the other jaw member.

As noted above, the electrosurgical generator 102 may also be configured to operate in a variety of modes, such as ablation, cutting, coagulation, and sealing. The electrosurgical generator 102 may include a switching mechanism (e.g., relays) to switch the supply of RF energy among the connectors to which various electrosurgical instruments may be connected. In embodiments, the electrosurgical generator 102 may be configured to provide RF energy to a plurality instruments simultaneously.

In further embodiments, the electrosurgical generator 102 may include a user interface having suitable user controls (e.g., buttons, activators, switches, or touch screens) for providing control parameters to the electrosurgical generator 102. These controls allow the user to adjust parameters of the electrosurgical energy (e.g., the power level or the shape of the output waveform) so that the electrosurgical energy is suitable for a particular electrosurgical mode (e.g., coagulating, ablating, tissue sealing, or cutting). The electrosurgical instruments 110 and 130 may also include a plurality of user controls. In addition, the electrosurgical generator 102 may include one or more display screens for displaying a variety of information related to operation of the electrosurgical generator 102 (e.g., intensity settings and treatment complete indicators).

FIG. 2 is a block diagram of the electrosurgical generator 102 of FIG. 1. The electrosurgical generator 102 includes a low frequency (LF) rectifier 220, a preamplifier 225, an RF inverter 230, a plurality of sensors 240, analog-to-digital converters (ADCs) 250, a controller 260, and a user interface (UI) 290. The electrosurgical generator 102 is configured to connect to an alternating current (AC) power source 210, such as a wall power outlet or other power outlet, which generates AC having a low frequency (e.g., 25 Hz, 50 Hz, or 60 Hz). The AC power source 210 provides AC power to the LF rectifier 220, which converts the AC to direct current (DC).

The direct current (DC) output from the LF rectifier 220 is provided to the preamplifier 225, which amplifies the DC to a desired level. The amplified DC is provided to the RF inverter 230, which includes an inverter 232 and a resonant tank 234.

In embodiments, the electrosurgical generator 102 may be battery-powered. Since the battery provides DC power to the electrosurgical generator 102, the electrosurgical generator 102 may not have to include the LF rectifier 220. Further, the electrosurgical generator 102 may be incorporated into the electrosurgical instruments 110 and 130 so that the electrosurgical generator 102 and the electrosurgical instruments do not need wires and thus may be portable.

The inverter 232 inverts the amplified DC waveform to an AC waveform having a frequency suitable for an electrosurgical procedure, which may be from about 100 kHz to about 1,000 kHz, and in certain embodiments from about 200 kHz to about 500 kHz. The appropriate frequency of the AC waveform may differ based on the desired electrosurgical procedure and modes of electrosurgery. For example, nerve and muscle stimulations cease at about 100,000 cycles per second (100 kHz) above which point some electrosurgical procedures can be performed more optimally, i.e., the electrosurgical energy can pass through a patient to targeted tissue with minimal neuromuscular stimulation. In an aspect, typically ablation procedures may use a frequency of about 472 kHz. The inverter 232 also filters square waves to produce sinusoid waves, which increases amplitude as a phase shift is increased.

The resonant tank 234 is coupled to the output of the inverter 232 and is configured to match the impedance at the inverter 232 to the impedance of the tissue to provide for optimal power transfer between the electrosurgical generator 102 and the tissue.

The electrosurgical energy inverted by the inverter 232 is controlled by the controller 260. The voltage and current waveforms of the electrosurgical energy output from the inverter 232 are sensed by the plurality of sensors 240 and are provided to the controller 260, which, in turn, generates control signals to control the output of the preamplifier 225 and the output of the inverter 232. The control signals may be PWM signals or phase-shifted PWM signals. The controller 260 also receives input signals via the user interface (UI) 290. The UI 290 allows a user to select a type of electrosurgical procedure (e.g., monopolar or bipolar), a particular electrosurgical mode (e.g., coagulation, ablation, sealing, or cutting), and/or input desired control parameters for the electrosurgical procedure or the mode.

The plurality of sensors 240 sense voltage and current at the output of the RF inverter 230. The plurality of sensors 240 may include two or more pairs or sets of voltage and current sensors to provide redundant measurements. Use of redundant sensors prevents dosage error of the RF inverter 230, such as due to failure or faulty readings from a single set of sensors. In embodiments, the plurality of sensors 240 may include fewer or more sets of voltage and current sensors depending on the application or the design requirements. The plurality of sensors 240 may also measure the voltage and current output of other components of the electrosurgical generator 102, such as the inverter 232 or the resonant tank 234. The plurality of sensors 240 may include any known technology for measuring voltage and current including, for example, a Rogowski coil.

The sensed voltage and current waveforms are fed to analog-to-digital converters (ADCs) 250. The ADCs 250 sample the sensed voltage and current waveforms to obtain digital samples of the voltage and current waveforms. The digital samples of the voltage and current waveforms are processed by the controller 260 and are configured to generate control signals for controlling the inverter 232 of the RF inverter 230 and the preamplifier 225. The ADCs 250 may be configured to sample the sensed voltage and current waveforms at a sample period that is an integer multiple of the RF frequency.

With continued reference to FIG. 2, the controller 260 includes a hardware accelerator 270 and a software compensator 280. As described above, the controller 260 is also coupled to a UI 290, which receives input commands from a user and displays input and output information related to characteristics of the electrosurgical energy (e.g., selected power level). The hardware accelerator 270 processes the output from the ADCs 250 and cooperates with the software compensator 280 to generate control signals as described in further detail below.

The hardware accelerator 270 is configured to adjust PWM characteristic for the RF inverter 230 so that the desired RF output is reached as quickly as possible, while the software compensator 280 is designed to determine and adjust the set points for the hardware compensator 274 including, but not limited to, the voltage, the current, the power, and combinations thereof. In an aspect, the set points may be desired maximum values for the RMS voltage and current, the average power and RMS values of other parameters. In another aspect, the set points may be desired maximum values for peak voltage and current, peak average power, and peak or maximum values of other parameters. In yet another aspect, the set points may be target values for the voltage, current, power, and other parameters.

In yet another aspect, the set points for the voltage, current, power, and other parameters may be set via the UI 290. The software compensator 280 then determines set points for the voltage, current, and power based on the measured values for the voltage, current and power provided from the hardware accelerator 270, and passes the set points for the voltage, current, and power to the hardware accelerator 270.

In embodiments, the hardware accelerator 270 may use peak values of the voltage, current and power to limit arc initiation when a crest factor varies over the operating range due to harmonic distortion inherent in the phase-shift PWM controlling scheme. The arc may be prevented by placing a limit on the peak voltage below a predetermined value. In an aspect, a peak current may also be used to limit the arc when the peak current suddenly increases.

The crest factor of the voltage may be calculated by dividing the peak voltage by the RMS voltage. The crest factor decreases for a given RMS setpoint when the discontinuous RF duty cycle increases and vice versa. Further, when the crest factor decreases for a given peak voltage, RMS values for voltage, current, and average power increase. In an aspect, the hardware accelerator 270 may control the RF inverter 230 by controlling the crest factor. A more detailed description of controlling the crest factor can be found in U.S. patent application Ser. No. 12/401,981 filed on Mar. 11, 2009, and entitled “Crest Factor Enhancement in Electrosurgical Generators,” the entire contents of which are incorporated by reference herein.

The hardware accelerator 270 includes dosage monitoring and control (DMAC) 272, a hardware compensator 274, an RF inverter controller 276, and a preamplifier controller 278. All or a portion of the controller 260 may be implemented by a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a digital signal processor (DSP), a microcontroller, or any other suitable logic device.

The DMAC 272 receives digital samples of the voltage and current waveforms from the ADCs 250 and calculates the average power, the voltage, the current, impedance of the tissue, or any other tissue or energy parameter as described in greater detail below. In an aspect, the DMAC 272 may decimate and filter the sensed voltage and current waveforms from the ADCs 250 and provide fast path data to the hardware compensator 274, and decimate and filter the sensed voltage and current waveforms from the ADCs 250 and provide slow path data to the software compensator 280. As used herein the terms “slow path” and “fast path” data denotes measured values for the power, the voltage, the current, the impedance of the tissue, and the like. The slow path data is more accurate than the fast path data, but having a larger time delay and a lower decimation rate than the fast path data, because the slow path data has more processes to compensate for the internal and external cable impedances.

The hardware compensator 274 receives the fast path data and generates a control signal for the RF inverter controller 276 in response thereto. In an aspect, the impedance of the tissue of the fast path data may be a real part of the tissue impedance. After receiving the control signal, the RF inverter controller 276, in turn, generates a first pulse-width modulation (PWM) control signal to control the output of the inverter 232. The control signal generated by the hardware compensator 274 may be a phase shift φ_(s) signal for the RF inverter 230. The PWM control signal may be generated based on the phase shift. The phase shift φ_(s) is further described with respect to FIGS. 4A and 4B below.

The software compensator 280 includes a high level algorithm 282, a state machine 284, and a setpoint generator 286. The software compensator 280 receives slow path data from the DMAC 272 and generates another control signal based on the slow path data. The software compensator 280 further receives parameters set via the UI 290, which may be an electrosurgical mode and target values for the voltage, the current, and the power. The parameters selected by a user are provided to the state machine 284, which determines a state or mode of the electrosurgical generator 102.

The high level algorithm 282 uses this state information and the output from the DMAC 272 to determine control data. The setpoint generator 286 receives the control data, generates the set points for the voltage, the current, and the power based on the control data. In particular, the setpoint generator 286 determines the current, power and voltage setpoints and/or limits as well as the desired output from the UI 290 and the high level algorithm 282. The set points may include, but are not limited to, the upper limits for the voltage, current, and the power, or for the peak voltage, peak current, and peak power. By adjusting the set points in real time, appropriate upper limits for the voltage, current, and power can be set as impedance changes. The set points may also adjust to deliver accurate energy to the patient since the hardware compensator 274 does not have access to the more accurate slow path sensor data.

The preamplifier controller 278 of the hardware accelerator 270 received the set points to generate an appropriate PWM control signal for controlling the preamplifier 225 to amplify the DC output from the LF rectifier 220 to a desired level. If the user does not provide operational parameters to the state machine 284 via the UI 290, then the state machine 284 may enter and maintain a default state. In an aspect, the preamplifier controller 278 may be implemented in the software compensator 280.

FIG. 4A shows a circuit diagram for the inverter 232 and a block diagram for the resonant tank 234. The inverter 232 may be a full H-bridge including four switches, Q_(a), Q_(b), Q_(c), and Q_(d) having a switching frequency of ω_(s). The switches Q_(a), Q_(b), Q_(c), and Q_(d) invert high voltage direct current (HVDC) from the preamplifier 225. Switches Q_(a) and Q_(b) are electrically coupled to the positive input to the resonant tank 234 and provide voltages to the positive input, and switches Q_(c) and Q_(d) are electrically coupled to the negative input and provide voltages to the negative input to the resonant tank 234. The voltage output from switches Q_(c) and Q_(d) are phase-shifted based on the phase shift φ_(s) from the RF inverter controller 276. The resonant tank 234 multiplies the voltage output from the switches Q_(c) and Q_(d) and adds to the voltage output from the switches Q_(a) and Q_(b). The resulting waveform is transferred to the tissue to be treated.

FIG. 4B shows graphical diagrams illustrating voltages of the positive and negative inputs and voltage of the resonant tank 234 of FIG. 4B. Top graph shows voltage V₁ supplied to the positive input of the resonant tank 234, which has a square wave having a magnitude of HVDC. The square wave rises up at the start of time, i.e., time=0, falls down at a half of a period T_(s), and rises up again at the end of the period, i.e., the period=T_(s).

The middle graph shows voltage V₂ supplied to the negative input of the resonant tank 234, which has a square wave having a magnitude of HVDC and is shifted by a phase φ₁₂, which is equal to the phase shift φ_(s) received from the RF inverter controller 276. Since the phase is related with the switching frequency ω_(s), the voltage waveform is shifted in time by

$\frac{\varphi_{12}}{\omega_{s}},$

where the switching frequency ω_(s) is equal to

$\frac{2\; \pi}{T_{s}}.$

The bottom graph shows voltage V_(tank) based on subtraction of the voltages V₁ and V₂ shown in the middle graph. Due to the phase shift φ₁₂, the voltage V_(tank) has a positive portion and a negative portion. Each portion has a magnitude of HVDC, which is the output of the preamplifier 225, and the temporal duration of

$\frac{\varphi_{12}}{\omega_{s}},$

such that, the DC power provided by the preamplifier 225 is inverted to the AC power having an appropriate level of the voltage, current, or power. As apparent in FIG. 4B, the duty cycle is directly proportional to the phase shift φ₁₂. The output of the inverter 232 (e.g., current, voltage, and power) is also proportional to the duty cycle, but not directly proportional.

FIG. 3 shows a detailed diagram of the hardware accelerator 270 of FIG. 2. The hardware accelerator 270 implements those functions of the electrosurgical generator 102 that may have special processing requirements, e.g., higher processing speeds. The hardware accelerator 270 includes the DMAC 272, the hardware compensator 274, the RF inverter controller 276, and the preamplifier controller 278 shown in FIG. 2.

The DMAC 272 includes four analog-to-digital converter (ADC) controllers 412 a-412 d, a digital signal processor 414, RF data registers 416, and DMAC registers 418. The ADC controllers 412 a-412 d control the operation of the ADCs 250, which samples digital data from sensed voltage and current waveforms. The digital data is then provided to the digital signal processor 414 that implements various filtering and other digital signal processing functions, some of which are described in more detail below.

The sensed voltage and current are input to the ADCs 250, which sample the sensed voltage and current. The ADC controllers 412 a-412 d provide operational parameters, including a predetermined sampling rate, to the ADCs 250 so that the ADCs sample the sensed voltage and current synchronously at a predetermined sampling rate, i.e., a predetermined number of samples per second, or predetermined sampling period. The ADC controllers 412 a-412 d may be configured to control the ADCs 250 so that the sampling period corresponds to an integer multiple of the RF frequency of the voltage and current waveforms.

The digital data obtained by sampling the voltage and current waveforms is provided to the digital signal processor 414 via the ADC controllers 412 a-412 d. The digital signal processor 414 uses the digital data to calculate voltage, current, power, and impedance, such as RMS voltage (V_(rms)), RMS current (I_(rms)), power, e.g., average power (P_(avg)), and the impedance Z_(re) of treated tissue. The RMS voltage V_(rms) and RMS current I_(rms) are calculated according to the following formulas (1) and (2):

V _(rms)=√{square root over (avg(V ²))}  (1) and

I _(rms)=√{square root over (avg(I ²))}  (2),

where V represents the samples of the voltage waveform, I represents samples of the current waveform, and “avg( )” represents an averaging function. The digital signal processor 414 uses averaging filters in calculating an average value of the real power. The average power P_(avg) and the impedance Z_(re) are then calculated according to the following formulas (3a), (3b), and (4):

$\begin{matrix} {{P_{avg} = {V_{rms} \times I_{rms} \times \cos \; \varphi}},} & \left( {3a} \right) \\ {{P_{avg} = {{avg}\left( {V \times I} \right)}},{and}} & \left( {3b} \right) \\ {{Z_{re} = {\frac{V_{rms}}{I_{rms}} \times \cos \; \varphi}},} & (4) \end{matrix}$

where φ is the phase angle between the sampled voltage and current waveforms. When the phase angle φ between the sampled voltage and current waveforms is calculated, the average power P_(avg) can be calculated based on the formula (3a). Based on the formula (3b), the average power P_(avg) is calculated by multiplying each voltage and current sample together and averaging the result.

Formulas (5a)-(5c) below are used for determining the impedance:

$\begin{matrix} {{Z = \frac{V_{rms}}{I_{rms}}},} & \left( {5a} \right) \\ {{Z = \frac{V_{rms}^{2}}{P}},{and}} & \left( {5b} \right) \\ {{Z = \frac{P}{I_{rms}^{2}}},} & \left( {5c} \right) \end{matrix}$

where P is power. The formula (5a) may be used when power is used to control an electrosurgical operation, the formula (5b) may be used when voltage is used to control the operation, and the formula (5c) may be used when the current is used to control the operation. In an aspect, for slow path calculation, the impedance may be also calculated from narrow band data, which may be filtered by a FFT or Goertzel filter at specific frequencies for cable compensation.

Peak voltage is the maximum or minimum of the AC voltage waveform, and peak current is the maximum or minimum of the current waveform. Peak values may ideally be 1.414 times the corresponding RMS value when waveforms are continuous sine or cosine. In an aspect, negative peak values may be calculated because the waveforms in discontinuous modes are not necessarily symmetric.

The digital signal processor 414 calculates the impedance by first calculating the RMS current and the average power as described above and then dividing the average power by the squared RMS current by using formulas (1) and (2), above.

The outputs (i.e., the voltage, the current, the power, and the impedance) of the digital signal processor 414 are stored in RF data registers 416 and provided to the software compensator 280 of FIG. 2 via the RF data registers 416. The DMAC 272 also includes DMAC registers 418 that receive and store relevant parameters for the digital signal processor 414. The digital signal processor 414 further receives signals from a PWM module 446 of the RF inverter controller 276. The RF data registers 416 may contain the RMS voltage V_(rms), the RMS current I_(rms), and the average power P_(avg) or the peak voltage V_(peak), and the peak current I_(peak). The contents of the RF data registers 416 are also passed on to the software compensator 280. The DMAC registers 418 provide the interface between the digital signal processor 414 and the software compensator 280. The DMAC registers 418 provide setup information, including, but not limited to sensor comparison delta limits, high pass filter coefficients, sensor scale factors (e.g., calibration coefficients), and combinations thereof. The DMAC 272 provides fast path data to the hardware compensator 274 and slow path data to the software compensator 280. As described above, the slow path data takes more time than the fast path data but is closer to the actual value than the fast path data.

As shown in FIG. 2, the hardware compensator 274 processes the fast path data and outputs a control signal (e.g., a phase) to the RF inverter controller 276. With reference to FIG. 3, the hardware compensator 274 includes a setpointer 420, compensator registers 422, a compensator 424, impedance/high voltage (Z/HVDC) scheduler 426, an integrated error calculator 428, a Cphase scheduler 430, and a limiter 432. The setpointer 420 receives the fast path data (e.g., the RMS voltage, the RMS current, and the average power), determines whether the data corresponds to a target value, and also determines when to switch the target value among the RMS voltage, the RMS current, and the average power. Although only the RMS voltage, the RMS current, and the average power are described as target values, the target values may be any suitable set points, including, but not limited to, peak voltage, peak current, peak power, and combinations thereof.

The determinations are based on the measured values, e.g., RMS voltage, the RMS current, the average power, the desired values and maximum limits. Slow path data received from the software compensator 280 and default values may be stored in the compensator registers 422.

The setpointer 420 determines a switching time of the target when any control variable exceeds the corresponding maximum limit, and determines the control variable, which exceeds the corresponding maximum limit, as the target. In an aspect, the setpointer 420 may determine the switching timing and the target based on bumpless switch, meaning that change of the target does not cause a sudden change (i.e., a bump) in the output of the RF inverter 230. The setpointer 420 provides the target to the compensator 424.

The compensator 424 compensates the value of the target for electrical and logical components of the controller 260. The compensator 424 compares a value of the target with a desired value, which is received from the software compensator 280 or stored in the compensator registers 422, and uses the difference to update a phase φ₃ to the RF inverter controller 276. The compensator 424 may store and accumulate an integrated error term for the compensation. When setpointer 420 provides a new target, the compensator 424 resets the integrated error term. The compensator 424 runs once every RF waveform repetition, e.g., every RF cycle.

In an aspect, the compensator 424 implements a second order proportional/integral/differential (PID) compensation algorithm. In an aspect, the compensator 424 may implement a fixed point version of a discrete second order transfer function H(z) shown in formula (6) below:

$\begin{matrix} {{{H(z)} = \frac{A_{0} + {A_{1} \cdot z^{- 1}} + {A_{2} \cdot z^{- 2}}}{1 + {B_{1} \cdot z^{- 1}} + {B_{2} \cdot z^{- 2}}}},} & (6) \end{matrix}$

where z is a discrete time variable, and A₀, A₁, A₂, B₁, and B₂ are constants, which can be obtained from a proportional constant, an integral constant, and a derivative constant of the PID compensation algorithm. By utilizing these implementations, the compensator 424 minimizes the difference (e.g., errors) between the measured value of the target provided by the DMAC 272 (i.e., RMS voltage, the RMS current, and the average power) and the desired value of the target set by the software compensator 280, and generates an output for adjusting the phase φ₃, which is the input to the RF inverter controller 276.

In an aspect, the compensator 424 operates once per every PWM period. The RF inverter controller 276 provides an update signal for compensation or a hold signal to the compensator 424. When the update signal indicates compensation, the compensator 424 performs compensation and, when the update signal indicates hold, the compensator 424 does not perform compensation.

In an embodiment, the compensator 424 may be a PID alpha controller, which contains a low pass filter on the derivative component of the PID controller. The PID alpha controller reduces sensitivity of the derivative term to high frequency noise. The PID controller may include a proportional constant K_(p), an integral constant K_(i), and a derivative constant K_(d). The PID controller calculates an output based on the following formula (7):

output=K _(p)·Err+K _(i)·IntErr+K _(d)·dErr   (7),

where Err is the difference or error between the measured value of the target value received from the setpointer 420 and the desired value of the target received from the software compensator 280, IntErr is an integrated error, and dErr is a derivative of the error. Specifically in the digital space, IntErr is calculated by the following formula (8):

IntErr_(n)=IntErr_(n−1)+Err_(n)   (8),

where IntErr_(n) is the current integrated error, IntErr_(n−1) is the previous integrated error, and Err_(n) is the current error. Thus, IntErr is the sum of the current error and the previous integrated error.

The derivative of the error, dErr, is obtained by using the following formula (9):

dErr_(n)=Err_(n)−Err_(n−1)   (9)

where dErr_(n) is the derivative of the current error, Err_(n) is the current error, and Err_(n−1) is the previous error. Thus, the derivative of the error is the difference between the current and previous errors.

In an aspect, the compensator 424 may include three separate PID compensator modules, one for each of the RMS voltage, the RMS current, and the average power. Since magnitudes for the RMS voltage, the RMS current, and the average power are different from each other, these three separate PID compensators are specifically designed to cover the corresponding ranges. In embodiments, the RMS voltage may be from about 1 to about 650volts, the RMS current may be from about 1 milli-Ampere to about 5.5 Amperes, and the average power may be from about 1 to about 375 watts.

The Z/HVDC scheduler 426 receives the measured impedance value and a high DC voltage value from the DMAC 272 and also receives a slow path impedance value from the software compensator 280. The Z/HVDC scheduler 426 generates an impedance-high voltage gain, ZHVDC gain, based on the impedance and the high DC voltage, which is the DC voltage provided by the preamplifier 225. ZHVDC gain may include two gain values, an impedance gain and a high-voltage gain. ZHVDC gain is designed to make the loop gain as constant as possible, since the RF inverter gain changes with both of the impedance and the HVDC values. The first phase φ₁is obtained by multiplying the impedance-high voltage gain to the output of the compensator 424, as shown below:

φ₁=(K _(p)·Err+K _(i)·IntErr+K _(d)·dErr)·ZHVDC_(gain)   (10).

In an aspect, voltage may change when a load (e.g., tissue to be treated) is coupled to the electrosurgical generator 102. When only the impedance gain is being processed by the compensator 424 and the voltage is the target value, the voltage varies based on the voltage divider rule and the resulted voltage gain due to the load may be calculated based on formula (11):

$\begin{matrix} {\frac{R_{Load}}{\left. {R_{Load} +} \middle| Z_{0} \right|},} & (11) \end{matrix}$

where R_(Load) is impedance of the patient load and |Z₀| is the magnitude of the matched load of the resonant tank 234. The impedance gain may be a reciprocal of the formula (11) so that multiplication of the formula (11) and the impedance gain is equal to one.

In another aspect, when the current is the target provided to the compensator 424, the current also changes when the load is loaded. The resulting current gain based on the load may be calculated using formula (12):

$\begin{matrix} {\frac{1}{\left. {R_{Load} +} \middle| Z_{0} \right|}.} & (12) \end{matrix}$

Thus, the impedance gain may be a reciprocal of the formula (12).

In yet another aspect, when the average power is the target, the power also changes when the load is coupled to the electrosurgical generator 102. The resulting power gain due to the load may be calculated based on formula (13):

$\begin{matrix} {\frac{R_{Load}}{\left( \left. {R_{Load} +} \middle| Z_{0} \right| \right)^{2}}.} & (13) \end{matrix}$

Thus, the impedance gain may be a reciprocal of the formula (13). In embodiments, the above-described gain formulas (11)-(13) may vary when another functional block (e.g., the Cphase scheduler 430 or the RF inverter 230) is considered and when a target is the RMS current or the average power.

In an aspect, when the high-voltage gain is considered, an inverter gain caused by the RF inverter 230 is expressed in the following formulas:

$\begin{matrix} {{\left| V_{out} \right| = \left. {\frac{4V_{g}}{\pi}\sin {\frac{\varphi_{s}}{2} \cdot}} \middle| H_{v} \right|},} & (14) \\ {{\left| I_{out} \right| = {\frac{4V_{g}}{\pi}\sin {\frac{\varphi_{s}}{2} \cdot \frac{\left| H_{v} \right|}{R_{load}}}}},{and}} & (15) \\ {{\left| P_{out} \right| = \frac{\left( \left. {\frac{4V_{g}}{\pi}\sin {\frac{\varphi_{s}}{2} \cdot}} \middle| H_{v} \right| \right)^{2}}{R_{load}}},} & (16) \end{matrix}$

where H_(v) is a transfer function of the RF inverter 230, |H_(v)| is the magnitude of the transfer function, or the high-voltage gain, V_(g), is the magnitude of the voltage input to the RF inverter 230.

As shown in the formulas (14)-(16) for the high-voltage gain above, the output of the compensator 424 is linearly proportional to the high-voltage gain |H_(v)| when the target is voltage or current, while the output of the compensator 424 is proportional to the square of the high-voltage gain |H_(v)| when the target is average power.

In an aspect, the Z/HVDC scheduler 426 may include a lookup table for the ZHVDC gain. The lookup table contained in the Z/HVDC scheduler 426 may include a set of lookup tables for cases when the target is current, voltage, and average power. Methods of generating lookup tables are described in detail below with reference to FIGS. 6C-6F.

The output from the compensator 424 is multiplied by the ZHVDC gain to obtain the first phase φ₁. The Cphase scheduler 430 receives the first phase φ₁ and generates a phase gain. The first phase φ₁ is then multiplied by the phase gain, resulting in a second phase φ₂. The Cphase scheduler 430 may also include a lookup table, which may include a plurality of lookup tables, each of which is selected based on the type of the target value, e.g., current, voltage, or average power, respectively.

The limiter 432 receives the second phase φ₂ and checks whether the second phase φ₂ is within a desired range. If the second phase φ₂ exceeds the maximum of the desired range, then the limiter 432 outputs the maximum as the third phase φ₃, if the second phase φ₂ is lower than the minimum, the limiter 432 outputs the minimum, and if the second phase φ₂ is within the desired range, the second phase φ₂ is going to be the third phase φ₃, which is a phase shift value for the phase shift φ_(s), to the RF inverter controller 276 and to the integrated error calculator 428.

In embodiments, the Cphase scheduler 430 may be implemented in several ways as shown in FIGS. 5A-5C. FIG. 5A shows a polynomial method to calculate a phase input φ₃* to the integrated error calculator 428. The Cphase scheduler 430 includes a fitting curve block 430 a and an inverse fitting curve block 430 b. The fitting curve block 430 a receives the first phase φ₁ and outputs the second phase φ₂ using a fitting curve, which may be a polynomial having the highest power N, which is greater than or equal to two, or a sum of trigonometric functions such as sine and cosine (e.g., Fourier summation). This fitting curve block 430 a compensates the output of the RF inverter 230 so as to obtain the second phase φ₂. The limiter 432 outputs the third phase φ₃ as described above in FIG. 4. The third phase φ₁ is then provided to the inverse fitting curve block 430 b which outputs the phase input φ₃* to the integrated error calculator 428. In as aspect, the fitting curve may be obtained by using a least square regression method.

In embodiments in which it may be difficult to find a function which is an inverse to the fitting curve used by the fitting curve block 430 a, a lookup table (LUT) method may be used for the Cphase scheduler 430 as shown in FIG. 5B. The Cphase scheduler may include a LUT block 430 c and an inverse LUT block 430 d. A lookup table used in LUT block 430 c and a lookup table used in inverse LUT block 430 d are inverse to each other. The lookup tables may be obtained from using the fitting curve used in FIG. 5A or numerical analysis including linear interpolation. The LUT block 430 c and the inverse LUT block 430 d operates as same as the fitting curve block 430 a and the inverse fitting curve block 430 b.

FIG. 5C is another variation of using a lookup table method. In this method, a LUT block 430 e generates a gain so that the first phase φ₁ is multiplied by the gain to obtain the second phase φ₂. And inverse LUT block 430 f process the third phase φ₃ to provide the phase input φ₃* to the integrated error calculator 428.

The compensator 424 and the gains are to increase the phase shift φ_(s) to compensate for changes in the control system loop gain due to effects of the load, HVDC, and the non-linear nature of the inverter output. This attempts to keep the control system response as consistent as possible over the operating range of the control system.

When the phase shift φ_(s) hits the minimum or maximum limit, the integrator increases or winds up. If the increase of the integrator is used, it causes a bump or jump in the control system output, which is undesirable because the integrated error has to be unwound before the computed phase shift falls between the minimum and the maximum limits. In this instance, the integrated error calculator 428 receives the first, second, and third phases, φ₁, φ₂, and φ₃, the impedance gain, the high voltage gain, and the phase gain, and recalculates an integrated error for the compensator 424 such that changes caused by the gains (e.g., the impedance gain, the high voltage gain, and the phase gain) and the PID parameters of the compensator 424 do not result in a phase shift that is less than the minimum limit or greater than the maximum limit.

When the phase shift is less than the minimum limit or greater than the maximum limit, the integrated error is recalculated to achieve a phase shift within the minimum limit and the maximum limit. Further, when the ZHVDC gain changes, or when inputs from the setpointer 420 changes due to a control mode change (e.g., from current control mode to voltage control mode or to the power control mode), the integrated error is recalculated. In embodiments, when the integrated error is to be recalculated, the new integrated error can be calculated using formula (17):

$\begin{matrix} {{{IntErr}_{n} = \frac{\frac{\varphi_{1}}{{ZHVDC}_{gain}} - {K_{p_{—}n} \cdot {Err}_{n}}}{K_{i_{—}n}}},} & (17) \end{matrix}$

where subscript “n” represents a temporal current state, meaning that K_(p) _(_) _(n) is the current proportional constant, K_(i) _(_) _(n) is the current integral constant, and IntErr_(n) is the current integrated error and “n+1” represents a next state, meaning that IntErr_(n+1) is the next integrated error.

In an aspect, the integrated error calculator 428 may be used when the second phase φ₂ is limited by the limiter 432 so that the integrated error does not windup during operations of the limiter 432. In other words, when the second phase φ₂ is limited by the limiter 432, the integrated error is increased as the compensator 424 attempts to raise the output past the limit. If the target is changed, conditions are changed, or the second phase φ₂ is limited by the limiter 432, the compensator 424 may create an undesirable change in the output due to the integrated error stored in the compensator 424. Thus, in these situations, the integrated error stored in the compensator 424 needs to be removed or updated. The integrated error calculator 428 recalculates the integrated error so that the compensator 424 can generate an output with this recalculated integrated error. In this way, wind-up occurrences may be prevented. This also prevents wind-up occurrences in cases when the target changes, parameters of the PID controller change, or the ZHVDC and phase gains change.

As to the phase gain calculation, the following formulas may be used:

$\begin{matrix} {{\left| V_{out} \right| = \left. {\frac{4V_{g}}{\pi}\sin {\frac{\varphi_{s}}{2} \cdot}} \middle| H_{v} \right|},} & (18) \\ {{\left| I_{out} \right| = {\frac{4V_{g}}{\pi}\sin {\frac{\varphi_{s}}{2} \cdot \frac{\left| H_{v} \right|}{R_{load}}}}},{and}} & (19) \\ {\left| P_{out} \right| = {\frac{\left( \left. {\frac{4V_{g}}{\pi}\sin {\frac{\varphi_{s}}{2} \cdot}} \middle| H_{v} \right| \right)^{2}}{R_{load}}.}} & (20) \end{matrix}$

The phase gain comes from the term,

$\sin {\frac{\varphi_{s}}{2}.}$

As shown in the above formulas (18)-(20), the phase gain of the voltage and current is

${\sin \frac{\varphi_{s}}{2}},$

which is shown in FIG. 6A and the phase gain of the average power is the square of

${\sin \frac{\varphi_{s}}{2}},$

which is shown in FIG. 6B.

FIG. 6A shows a graph of

$\sin \frac{\varphi_{s}}{2}$

starting from the origin point, and a graph of its derivative starting from 1 in the vertical axis, where the phase shift φ_(s) ranges from 0 degree to 180 degrees. The horizontal axis represents a phase and the vertical axis represents magnitude of

$\sin \frac{\varphi_{s}}{2}$

or its derivative. Note that the derivative of

$\sin \frac{\varphi_{s}}{2}\mspace{14mu} {is}\mspace{14mu} \frac{1}{2}\cos \frac{\varphi_{s}}{2}$

and thus the maximum magnitude of the derivative is ½. Here, the maximum magnitude of the derivative is normalized to one as shown in FIG. 6A. FIG. 6B shows a graph of the square of

$\sin \frac{\varphi_{s}}{2}$

having a quarter sine wave and a graph of its derivative having a half sine wave.

FIGS. 6C-6F illustrate a method to calculate a lookup table for a phase gain when the target is the average power. This method can be applied to calculate lookup tables for the impedance gain and the HVDC gain. FIG. 6C shows power variations caused by the RF inverter 230 with respect to the phase. The horizontal axis represents a phase difference, which is normalized to one, and the vertical axis represents a power difference. The phase gain is calculated by dividing the difference of the output of the RF inverter 230 by the difference of the phase shift. Thus, the gain caused by the RF inverter 230 can be obtained from the graph of FIG. 6C.

In order to calculate a lookup table contained in the Cphase scheduler 430, the magnitude of the gain is normalized to one as shown in FIG. 6D. The horizontal axis and the vertical axis of FIG. 6D are swapped as shown in FIG. 6E. FIG. 6F shows a graph whose values in the vertical axis are obtained by dividing values in the vertical axis of the graph of FIG. 6E by the normalized phase ranging from zero to one. The lookup table has two columns, the first column represents the phase shift, which is the second phase φ₃, and the second column is for the phase gain. Thus, a value in the horizontal axis is a value in the first column of the lookup table and the corresponding value in the vertical axis is the corresponding value in the second column of the lookup table.

When the hardware compensator 274 outputs the third phase φ₃ as a phase shift value, the RF inverter controller 276 processes the third phase φ₃ and outputs control signals for the phase-shift PWM signal to control the RF inverter 230. The control signal is generated for each PWM period. The RF inverter controller 276 can also control the compensation of the compensator 424 for each PWM period by providing a hold/compensate control signal to the hardware compensator 274. In this way, the RF inverter controller 276 may update the third phase φ₃, as a phase shift value for the phase shift φ_(s) for calculating variables for PWM signal.

With reference to FIG. 4, the RF inverter controller 276 includes a scale 442, PWM registers 444, and a PWM module 446. The scale 442 receives the third phase φ₃ and scales it to a value that is appropriate for PWM variable, which may be a signal falling time related to pulse width compensation, a Bphase or Cphase related to the phase shift compensation, or a period value related to frequency compensation. In embodiments, the PWM variable may be a Bphase or Cphase. The scale 442 may implement a linear formula (21) as follows:

φ_(s) =M*(φ+φ₃)+B   (21),

where M is a scalar coefficient, φ is a phase, φ₃ is a phase shift, and B is a constant. The phase is scaled for PWM signals. In other words, the phase is converted to a temporal delay for the PWM module 446.

The PWM registers 444 may include four registers storing parameters, a PWM period, a pulse width, and a phase. Values stored in the four registers may be updated or replaced with new values, such as the scaled third phase and the desired values for RMS voltage, current, and power from the software compensator 280. The PWM registers 444 provides the updated or renewed values to the PWM module 446.

Upon reception of the values from the PWM registers 444, the PWM module 446 provides control signals to the RF inverter 230. The control signal is for a phase-shifted PWM signal. The PWM module 446 further provides the hold/compensate signal to the compensator 424 of the hardware compensator 274 so that the PWM module 446 can control the compensator 424 when to compensate and when to hold.

FIG. 7 shows an embodiment of the PWM module 446 of FIG. 4 that may be capable of providing different resolutions with respect to the period, pulse width, and phase relationships. The PWM module 446 includes time base generators 710 and 712, an event generator 714, PWM modulators 720 and 740, output stages 732 a and 752 a, high resolution (HR) output stages 732 b and 752 b, ultra high resolution (UHR) output stages 732 c and 752 c, and trip zone controllers 734, 736, 754, and 756.

The time base generators 710 and 712 directly manage frequency, duty cycle, rising and falling edge delays, and phase shifts. Each time base generator 710 or 712 further manages two control signals among the control signals to the RF inverter 230, respectively, and provides information necessary for generating output signals with multiple levels of resolutions. In an aspect, when the clock of the time base generator generates 125 megahertz (MHz) clock signals, the time base generator can generate 8 nanosecond (ns) of resolution.

In embodiments, the time base generators 710 and 712 may generate three different clock signals for the output stages, the HR output stages, and the UHR output stages. The number of output stages is not limited to three but can be expanded to more than three. In an aspect, when the time base generator operates at 125 MHz, the output stages 732 a and 752 a may also operate at 125 MHz clock signals or 8 ns of resolution, the HR output stages 732 b and 752 b may operate at 1 gigahertz (GHz) clock signals or 1 ns of resolution. In another aspect, the time base generator 710 or 712 may operate at a faster clock signal so that the UHR output stage 732 c and 752 c may operate at 12.5 GHz clock signals or 80 picosecond (ps) of resolution.

The event generator 714 generates periodic synchronization signals. In an aspect, the event generator 714 may generate event signals at programmable offsets within the period of clock signal of the time base generator 710 or 712. In other words, multiple event signals may be generated within a period of the clock signal of the time base generator. For example, when the time base generators 710 and 712 operate at 125 MHz clock signals, the period of the clock signals is 8 ns and the event generator 714 generates multiple event signals within 8 ns. In another aspect, the multiple event signals may be equally spaced within the period of the clock signal.

Additionally, the event generator 714 may generate one event signal every N periods of the clock signal and the event signal may last for M periods, where N and M are natural numbers and M is less than N.

Output stages, 732 a and 752 a, generate output signals within a predetermined period or resolution and provide the output signals to the trip zone controllers 734 and 754, respectively. In the same manner, the HR output stages 732 b and 752 b and the UHR output stages 732 c and 752 c also generate and provide output signals to the corresponding trip zone controllers 736 and 756.

The trip zone controllers 734, 736, 754, and 756 are the final circuit to generate the control signals for the phase-shifted PWM to the RF inverter 230. The trip zone controllers 734, 736, 754, and 756 receive a trip signal and parameters from the PWM registers 444. The trip zone controllers 734, 736, 754, and 756 may be tripped or held in an inactive state based on the trip signal. In other words, when a trip signal to any one of the trip zone controllers 734, 736, 754, and 756 is active, then the corresponding trip zone controller 734, 736, 754, or 756 is being held inactive and when the trip signals to all of the trip zone controllers 734, 736, 754, and 756 are inactive, then all of the trip zone controllers 734, 736, 754, and 756 output control signals. The trip zone controllers 734, 736, 754, and 756 are set active when a measured parameter (e.g., the RMS voltage, the RMS current, or the average power), which is external to the PWM module 446, exceeds a critical level. Since inactive state of only one trip zone controller 734, 736, 754, or 756 can disable the control signal for the phase-shifted PWM signal, the RF inverter 230 is turned off quickly and is prevented from malfunctions or failures.

In an aspect, the trip zone controllers 734, 736, 754, and 756 may be also set active when signals internals to the RF inverter 230 exceed a critical level. This feature can protect hardware components from hardware failures.

In embodiments, the PWM registers 444 receives parameters from the software compensator 280 for adjusting values stored in the PWM registers 444. The software compensator 280 may consistently adjust threshold values for the trip zone controllers as the impedance of the load decreases or increases. The threshold values may be based on the RMS values or the peak values for the voltage, current, and average power.

In an aspect, the trip zone controllers 734, 736, 754, and 756 may include a leading-edge blanking feature, meaning that the trip zone controllers can ignore the trip signal at the beginning of each PWM period. After the leading-edge blanking period is over, the trip signal is resumed to be enabled, meaning that a trip signal within the leading-edge blanking period cannot make a trip zone controller inactive, but a trip signal outside of the leading-edge blanking period can make a trip zone controller inactive. Even when all of the trip zone controllers 734, 736, 754, and 756 may be tripped or inactive by the trip signal, the control signals of the PWM module 446 are always driven and never tri-stated. In other words, trip zone controllers 734, 736, 754, and 756 may generate control signal having a constant output when one of the trip zone controllers 734, 736, 754, and 756 is inactive so that the RF inverter 230 cannot generate AC signals.

The trip signal may be a cycle-by-cycle trip event, a multi-cycle trip event, or a trip-hold event. The cycle-by-cycle trip event may cause the control signals, which are output from the PWM module 446, to be held in its inactive state until the end of the current period of the clock signals of the time base generator 710 or 712. At each period of the clock signal, the trip signal may be automatically enabled.

The multi-cycle trip event may cause the control signals to be held in its inactive state for a number of periods of the clock signal. After the number of periods, the trip signal may be automatically enabled.

The trip-hold event may cause the control signals to be held in their inactive states indefinitely. This inactive state may be made by external inputs. As described above, inactive state of a trip zone does not mean that the corresponding trip zone controller does not generate a control signal. That means that the corresponding trip zone controller outputs a constant or consistent control signal with which the RF inverter 230 cannot generate AC signals.

The PWM modulators 720 and 740 may be used to modulate the control signals output from the PWM module 446 so that the control signals are enabled for M of N periods of the time base generator. That is the control signals are modulated only for the first M periods during the N periods. Thus, modulation of the control signals for the last N-M periods may be disabled. This feature is related to the leading-edge blanking period feature described above in the trip zone controllers. In other words, while modulation of the control signals are enabled, the trip signals are disable for the first M periods during the N periods.

In embodiments, control variable may be set to one among the voltage, current, and power rather than switching them based on values for the voltage, current, and power. This system is called a multi-input single output (MISO) control system. Since the target variable is set, there is no need to determining which variable is set to be a target variable and when to switch the target variable. For example, when the target variable is the voltage, whether it is the RMS or peak voltage, the hardware compensator 274 only compensates the voltage for the phase shift.

FIGS. 8A and 8B show block diagrams of the MISO control system, which may replace the software compensator 280 and the hardware compensator 274 of the electrosurgical generator 200 of FIG. 2. A software compensator 850 of the MISO control system receives data from the UI 290 and the DMAC 272. The data from the UI 290 is desired limits for the RMS voltage, the RMS current, and the average power and the data from the DMAC 272 is measured values for the RMS voltage, the RMS current, and the average power. The desired limits may be obtained from a table stored in the software compensator 850 based on the measured values from the DMAC 272. Results of the software compensator 850 of the MISO control system are a pulse train with a range from 0 to 1.

Subtraction block 805 subtracts a measured value from a desired limit and provides an output from the subtraction to a comparison block 820. If the measured value is greater than or equal to the desired limit, the comparison block 820 outputs zero, and if not, the comparison block 820 outputs one.

Addition block 810 adds a constant value to the desired limits so that an error of division by zero is prevented. The constant value may be a very small number compared to the desired limits. Division block 815 then divides the output of the subtraction block 805 by the output of the addition block 810 and calculates a percentage difference between the actual value and the desired limit. In an aspect, the software compensator 850 may include separate subtraction block and separate addition block for each of the voltage, current, and the power.

The output of the comparison block 820 goes from zero to one when the measured value becomes less than the desired limit and provides the result to 1-D LUT 825, which includes a LUT by calculating percentage differences between the desired limit and the measured value based on formula (22):

$\begin{matrix} {{{Percentage}\mspace{14mu} {difference}} = {\frac{{{desired}\mspace{14mu} {value}} - {{measured}\mspace{14mu} {value}}}{{desired}\mspace{14mu} {value}}.}} & (22) \end{matrix}$

The 1-D LUT 825 control to generate a very small value when the desired value is close to the measured value and generally a value smaller than one.

When two output values are multiplied by multiplication block 830, the result can be smaller than the measured value because of the LUT stored in the 1-D LUT 825. The saturation block 835 then saturates the output from the multiplication block 830 to limit the output to be within a predetermined range.

The limitation block 840 receives inputs from the UI 290, the DMAC 272, the division block 815, the comparison block 820, the 1-D LUT 825, the multiplication block 830, and the saturation block 835 and outputs a pulse train. The pulse train has a minimum of zero when the actual value is greater than the desired limit, has a value between zero and one when the actual value is close to the desired limit, and has a maximum of one when the actual value and the desired limit are far apart. Thus, the pulse train of the limitation block 840 is used to allow a gentle adjustment and less ripple or bump is resulted when the actual value is bouncing around the desired limit. In other words, when the voltage, current, or power is greater than the corresponding desired limit, the output is close to zero, and when any one is far less than the desired limit, the output is close to one.

FIG. 8B shows a block diagram of the MISO control system 800. The MISO control system 800 includes the software compensator 850, a multiplication block 855, a filter 860, and a multiplication block 865. The software compensator 850 includes three blocks 850 a-850 c, each of which includes all the components in FIG. 8A and outputs a value based on the voltage, current, and power, respectively. The multiplication block 855 multiplies the three outputs from the software compensator 850 and provides its result to the filter 860. In an aspect, the multiplication block 855 may also collect other limits such as crest factor, peak values, etc. Since the result of the software compensator 850 is the output of each limitation block 840, the result of the software compensator 850 is ranged from zero to one. Thus, the result of the multiplication block 855 is also ranged from zero to one is at least less than or equal to each of the outputs of the limitation blocks 840.

The filter 860 may be a first order low pass filter or a higher order low pass filter. The higher the order is, the slower the response is. On the other hand, the lower the order is, the higher the ripple in the response is. The filter 860 removes higher frequency portions or noise in the output from the multiplication block 855. The multiplication block 865 then multiplies the output from the filter 860 to the measured value of the target which is predetermined among the voltage, current, and the power. The output of the multiplication block 865 is then input to the RF inverter control 276. In a case when any measured value of the voltage, current, and power exceeds the corresponding desired limit, the output of the filter 860 is less than 1.0. Thus, when multiplied by the output of the filter 860, the output of the MISO control system 800 becomes less than the target and thus less than the corresponding desired limit. In a case when no measured values are greater than the desired limit, the output of the filter 860 is equal to 1.0 and when multiplied by the output of the filter 860, the output of the MISO control system 800 is equal to the target and thus less than the corresponding desired limit. In this way, the output value of the MISO control system 800 may remain within a desired range. In an aspect, implementation of the MISO control system 800 is structurally simpler than the implementation of the hardware compensator 274 of FIG. 4.

FIG. 9 illustrates another control system for the electrosurgical generator 102 of FIG. 1. This simplified block diagram shows an electrosurgical generator 900 having a high voltage DC power control scheme. The electrosurgical generator 900 includes a high voltage DC (HVDC) power supply 910, an RF inverter 920, sensor 930, ADCs 940, hardware controller 950, and a HVDC setpointer 960. The HVDC power supply 910 provides a high voltage DC power to the RF inverter 920. A value for the HVDC power is set by the HVDC setpointer 960.

The RF inverter 920, the sensors 930, and the ADCs 940 operate similarly as the RF inverter 230, the sensors 240, and the ADCs 250 of FIG. 2. Thus, the descriptions of them are omitted.

As described above in FIG. 3B, the input voltage to the resonant tank of the RF inverter is a square wave. Fourier series approximation of the square wave is following:

$\begin{matrix} {{\sum\limits_{{n = 1},3,5,\cdots}^{\infty}\; {\frac{4{HVDC}}{n\; \pi}{\sin \left( \frac{n\; \varphi_{1\; 2}}{2} \right)}{\cos \left( {n\; \omega_{s}t} \right)}}},} & (23) \end{matrix}$

where HVDC is the magnitude of the square wave, φ₁₂ is a phase of the PWM signal, and ω_(s) is the switching frequency of the RF inverter. As shown in the formula (23), RF waveform is distorted based on the phase φ₁₂. This is due to the high frequency harmonic content of the square wave. Significant contents of the harmonics are in the third and fifth harmonics.

FIG. 10 shows a graph of contribution of the third and fifth harmonics relative to the fundamental of the PWM signal input to the resonant tank of the RF inverter 920. The vertical axis represents percent of the sum of the third and fifth harmonics and the horizontal axis represent a phase ranging from 0 to 180 degrees. The graph shows several local maximums and minimums. It is apparent that the contribution of the third and fifth harmonics is minimal over a range of phases from 120 to 144 degrees.

Amplitude of the Fourier components of the square wave of formula (23) is determined by the product of the HVDC and the phase. Thus, by raising the HVDC, the electrosurgical generator 900 needs a lower phase to reach the same output it would get by lowering the HVDC and increasing the phase. HVDC term is a direct multiplier to the Fourier component, while the phase term is an indirect multiplier, which is in the form of sine, to the Fourier term. Thus, controlling the HVDC term will result in linear control of the output of the RF inverter 920.

The RF inverter 920 tends to run more efficiently within a certain range of phase. For example, as the phase increases, an H-bridge in the RF inverter 920 transitions from hard switching, which is inefficient, to zero voltage switching (ZVS), which is very efficient. During this transition, the output of the RF inverter 920 changes little with a change in the phase.

Further, changes of the phase result in different changes in the output of the RF inverter 920 depending on the value of the phase, meaning non-linear changes. Thus, by controlling the HVDC term and keeping the phase constant, the control system of the electrosurgical generator 900 is simplified.

The hardware controller 950 receives digital samples of the voltage and current waveforms and a desired value for the voltage and current, and controls the RF inverter 920 by selecting an ideal PWM phase which is near the range where the contribution of the third and fifth harmonics are minimal or where the H-bridge of the RF inverter 920 operates in ZVS, and controls the HVDC to control the output of the RF inverter 920. The hardware controller 950 also provides a measured power to the HVDC setpointer 960.

The HVDC setpointer 960 receives the measured power and a desired power, and compares the difference between them. The HVDC setpointer 960 sets and provides a magnitude to the HVDC power supply 910, which generates the corresponding power having the magnitude, accordingly.

By controlling the HVDC and fixing the phase, this controlling system minimizes harmonic distortion in the output of the RF inverter 920, minimizes RF high frequency leakage, minimizes heat dissipation by keeping the RF inverter 920 in an efficient range, increases this controlling system performance by keeping the change of the output of the RF inverter 920 in its linear range, increases the energy output ranges of the RF inverter by allowing changes in the HVDC during activation of the electrosurgical generator 900, and adjusts any inaccuracies in the HVDC output.

In other words, the HVDC setpointer 960 controls the HVDC term much more slowly than the hardware controller 950 controls the phase. In particular, the hardware controller 950 updates the phase relatively quickly but the updated phase is less accurate, while the HVDC setpointer 960 controls and keeps the HVDC term within a preferred range relatively slowly but the HVDC term is more accurate.

In an aspect, when the electrosurgical generator 900 is activated, the HVDC level is set to a default by the HVDC setpointer 960. The hardware controller 950 receives digital data from the sensors 930 via the ADCs 940 and calculates a phase shift. Further, the hardware controller 950 compares the phase with a desired threshold, which may be the fixed phase used by the RF inverter 920.

When the phase is greater than the desired threshold, the HVDC setpointer 960 increases the value for the HVDC power so that the HVDC supply 910 generates higher DC power. When the phase is less than the desired threshold, the HVDC setpointer 960 decreases the value for the HVDC power so that the HVDC supply 910 generates lower DC power. In this way, the level of the HVDC power is set within a desired range or sufficiently equal to the desired threshold.

Although the illustrative embodiments of the present disclosure have been described herein with reference to the accompanying drawings, it is to be understood that the disclosure is not limited to those precise embodiments, and that various other changes and modification may be effected therein by one skilled in the art without departing from the scope or spirit of the disclosure. 

What is claimed is:
 1. A controller for an electrosurgical generator, the controller comprising: a radio frequency (RF) inverter configured to generate an electrosurgical waveform; a signal processor configured to output a measured value of at least one of a voltage, a current, or power of the electrosurgical waveform; a software compensator configured to generate a desired value for at least one of the voltage, the current, or the power of the electrosurgical waveform; a hardware compensator configured to generate a phase shift based on the measured value and the desired value; and an RF inverter controller configured to generate a pulse-width modulation (PWM) signal based on the phase shift to control the RF inverter.
 2. The controller according to claim 1, wherein the hardware compensator includes: a setpointer configured to select a target value for at least one of the voltage, the current, or the power of the electrosurgical waveform; and a compensator configured to compensate for a first phase based on the target value.
 3. The controller according to claim 2, wherein the compensator includes a proportional-integral-differential (PID) controller.
 4. The controller according to claim 3, wherein the PID controller implements a second order PID algorithm.
 5. The controller according to claim 2, wherein the compensator performs compensation for each period of the PWM signal.
 6. The controller according to claim 2, wherein the hardware compensator further includes: an impedance gain scheduler configured to calculate an impedance gain; a voltage gain scheduler configured to calculate a voltage gain; and a phase gain scheduler configured to calculate a phase gain.
 7. The controller according to claim 6, wherein the hardware compensator is further configured to multiply the first phase by the impedance gain and the voltage gain to obtain a second phase.
 8. The controller according to claim 7, wherein the hardware compensator is further configured to multiply the second phase by the phase gain to obtain a third phase.
 9. The controller according to claim 6, wherein the hardware compensator is further configured to generate the phase shift for the RF inverter controller in response to an update signal from the RF inverter controller.
 10. The controller according to claim 2, wherein the hardware compensator further includes a limiter configured to limit a third phase within a predetermined range.
 11. The controller according to claim 10, further comprising a scale configured to scale the third phase and provide the scaled third phase as the phase shift to the RF inverter controller.
 12. The controller according to claim 1, wherein the RF inverter is further configured to adjust average power of the electrosurgical waveform based on the phase shift, the phase shift being from about zero to about pi radian.
 13. The controller according to claim 1, wherein the signal processor is further configured to decimate and filter sensed voltage and current waveforms of the electrosurgical waveform to provide first and second path data to the software compensator.
 14. An electrosurgical generator comprising: a radio frequency (RF) inverter configured to generate an electrosurgical waveform; a plurality of sensors coupled to the RF inverter and configured to sense a voltage waveform and a current waveform of the electrosurgical waveform; a plurality of analog-to-digital converters (ADCs) configured to digitally sample the sensed voltage and current waveforms; and a controller coupled to the plurality of ADCs, the controller including: a signal processor configured to output a measured value of at least one of a voltage, a current, or power, of the electrosurgical waveform; a software compensator configured to generate a desired value for at least one of the voltage, the current, or the power of the electro surgical waveform; a hardware compensator configured to generate a phase shift based on the measured value and the desired value; and an RF inverter controller configured to generate a pulse-width modulation (PWM) signal based on the phase shift to control the RF inverter.
 15. An electrosurgical generator comprising: a power supply configured to output high voltage direct current (HVDC) power; a radio frequency (RF) inverter coupled to the power supply and configured to generate an electrosurgical waveform; a plurality of sensors configured to sense a voltage waveform and a current waveform of the electrosurgical waveform; a plurality of analog-to-digital converters (ADCs) configured to digitally sample the sensed voltage and current waveforms; and a controller coupled to the plurality of ADCs, the controller including: a signal processor configured to output a measured value of at least one of voltage, current, or power of the electrosurgical waveform based on the digitally sampled voltage and current waveforms; a HVDC setpointer configured to set a desired value for the HVDC power; and an RF inverter controller configured to generate a pulse-width modulation (PWM) signal having a fixed phase to control the RF inverter.
 16. The electrosurgical generator according to claim 15, wherein the fixed phase is in a range where the RF inverter operates in zero voltage switching.
 17. The electrosurgical generator according to claim 15, wherein the signal processor is further configured to calculate a phase shift.
 18. The electrosurgical generator according to claim 17, wherein the signal processor is further configured to compare the phase shift with the fixed phase.
 19. The electrosurgical generator according to claim 18, wherein the HVDC setpointer is further configured to decrease the desired value for the HVDC power when the phase shift is less than the fixed phase.
 20. The electrosurgical generator according to claim 18, wherein the HVDC setpointer is further configured to increase the desired value for the HVDC power when the phase shift is greater than a threshold. 